<template>
	<view class="box">
		<view class="tip">提现一般在1小时左右到账（夜间02:00-早上08:00除外），需要秒到账，请直接联系在线客服（在线时间：早上08:00-夜间02:00）发送天玩ID即可。</view>
		<view class="main">
			<xzy-paging-down ref="scrollViewRef" @query-data="getDataInfo" class="scroll-view" :api="GetPayOrderListApi"
				:params="initParams">
				<item v-for="(cur, i) in dataList" :key="i" :item="cur" @click="goOrderInfo(cur)">
					<template v-slot:title>
						{{ cur.title }}
						<text :style="{
										color: cur.status == 1 ? '#FF9A00' : cur.status == 2 ? '#222222' : '#FF0000'
									}">
							{{ cur.statusMsg }}
						</text>
					</template>
				</item>
			</xzy-paging-down>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive,
		onMounted
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	import Item from './index.vue'
	import {
		GetPayOrderListApi
	} from '@/api/modules/mine.js'
	import useStore from '@/stores'
	const {
		globalStore
	} = useStore()
	const userId = globalStore.userInfo.id
	const dataList = ref([])
	const scrollViewRef = ref()


	const initParams = reactive({
		type: 1
	})

	const getDataInfo = (data) => {
		dataList.value = data
	}

	function goOrderInfo(item) {
		uni.navigateTo({
			url: "/pages_mine/wallet/record/withdraw_deposits",
			success: function(res) {
				res.eventChannel.emit('orderInfo', item)
			}
		})
	}
</script>

<style lang="scss" scoped>
	.box {
		display: flex;
		flex-direction: column;
		height: 100%;

		.tip {
			font-size: 24rpx;
			color: #ea8400;
			line-height: 40rpx;
			padding: 10rpx 30rpx;
			background: #fffbea;
		}

		.main {
			width: 100%;
			flex: 1;
		}
	}
</style>